<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<title>环境检测 - 115cms综合内容管理系统</title>
  <link rel="stylesheet" href="/public/layui/css/layui.css">
  <script src="/public/layui/layui.js"></script>
  <script src="/public/js/jquery-3.4.1.min.js"></script>
<style>
* {
	margin:0;
	padding:0;
}
a{ text-decoration:none;}
 
.login-bg {

 
}
.content {
    width: 1080px;
    margin: 0 auto;
    margin-top: 50px;
    background: rgb(255, 255, 255);
    border-radius: 10px;
    padding: 10px 20px;
    box-sizing: border-box;
    box-shadow: 0 0 100px #bdb5b5;
}
@media screen and (max-width: 800px) { 
.content {
	
    width: 95%;
}
}

.title h2 {
	font-size:22px;
	line-height:60px;
	color:#333;
	font-weight:bold;
	text-align:center;
}
.p {
    font-size: 15px;
    line-height: 30px;
    color: #333;
}
.login-button {
	background-color:#1e90ff;
	height:50px;
	border-radius:5px;
	font-size:18px;
	color:#fff;
	text-align:center;
	line-height:50px;
	cursor:pointer;
}
.top {
    background-color: #000000;
    height: 200px;
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    line-height: 200px;
}
.login-buttonz {
	background-color: #000000;
	height:50px;
	border-radius:5px;
	font-size:18px;
	color:#fff;
	text-align:center;
	line-height:50px;
	cursor:pointer;
	width: 45%;
	float: left;
}
.login-buttony {
	background-color: #000000;
	height:50px;
	border-radius:5px;
	font-size:18px;
	color:#fff;
	text-align:center;
	line-height:50px;
	cursor:pointer;
	width: 45%;
	float: right;
}
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}
</style>
</head>
<body>
<div class="top">第二步: 环境检测</div>
<div class="login-bg">
    <div class="content">
        <div class="title">
            <h2>环境检测</h2>
        </div>
    	<div class="p">
           <table class="layui-table" lay-size="lg">
             <colgroup>
               <col width="150">
               <col width="200">
               <col>
             </colgroup>
             <thead>
               <tr>
                 <th>坏境</th>
                 <th>最低配置</th>
                 <th>当前配置</th>
                 <th>是否符合</th>
               </tr> 
             </thead>
             <tbody>
               <tr>
                    <td>操作系统</td>
                    <td>不限</td>
                    <td><?php echo php_uname('s'); ?></td>
                    <td class="yes">√</td>
               </tr>
               <tr>
                    <td>php版本</td>
                    <td>&gt;5.6</td>
                    <td><?php echo PHP_VERSION ?></td>
                    <?php $php_version=explode('.', PHP_VERSION); ?>
                    <td class="<?php if(($php_version['0']>=7) || ($php_version['0']>=5 && $php_version['1']>=3))echo 'yes'; ?>">
                        <?php if (($php_version['0']>=7) || ($php_version['0']>=5 && $php_version['1']>=6)): ?>
                            √
                        <?php else: ?>
                            ×
                        <?php endif ?>
                    </td>
               </tr>
                <tr>
                    <td>./Uploads</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../uploads')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../uploads'))echo 'yes'; ?>">
                        <?php if (is_writable('../uploads')): ?>
                            √
                        <?php else: ?>
                            ×
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td>./Runtime</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../runtime')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../runtime'))echo 'yes'; ?>">
                        <?php if (is_writable('../runtime')): ?>
                            √
                        <?php else: ?>
                            ×
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td>./install</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../install')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../install'))echo 'yes'; ?>">
                        <?php if (is_writable('../install')): ?>
                            √
                        <?php else: ?>
                            ×
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td>./app</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../app')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../app'))echo 'yes'; ?>">
                        <?php if (is_writable('../app')): ?>
                            √
                        <?php else: ?>
                            ×
                        <?php endif ?>
                    </td>
                </tr>
             </tbody>
           </table>
		<br><br>
		</div>
        <div class="form-box">
            <a href="./index.php?c=agreement"><div class="login-buttonz">上一步</div></a>
            <a href="javascript:;" onclick="testClick()"><div class="login-buttony">下一步</div></a>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
</body>
</html>
<script>
function testClick(){
    if($('.yes').length!=6){
        alert('您的配置或权限不符合要求');
    }else{
        location.href='./index.php?c=create';
    }
}
</script>